import {
    createStore,
    applyMiddleware
} from 'redux';
import reducers from '../reducers'
import thunk from 'redux-thunk'
/* reducer只支持同步操作，不支持异步操作，thunk是异步的中间件,所有中间件交给applyMiddleware */

//1.创建一个仓库    3.将数据放到store
//reducers是一个很多个reducer组成的对象
const store = createStore(reducers, applyMiddleware(thunk));
export default store;